<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

<?php
	include ('include/config.php');
	include ('include/conn.php');
	
	
	$content=$_POST['content'];
	$name=$_POST['name'];
	$qq=$_POST['qq'];
	$time=date( 'Y-m-j H:i:s' ); 
	$ip=getenv('REMOTE_ADDR');
	var_dump ($content);
	echo "<hr>";
	$sql="insert into tab(content,name,qq,time,ip) values ('$content','$name','$qq','$time','$ip')";
	var_dump ($sql);
	$guest=mysql_query($sql);
	//~ var_dump ($guest);
	if($guest)
		{	
			echo <<<aaa
			<script>
			alert('留言成功')
			location.href='index.php'
			</script>
aaa;
		}
?>  